


#include "os.h"


#include "log.h"


D_LOG_DOMAIN(modules_test,"this is a modules case, show csvt in diff");
//D_LOG_DOMAIN(modules_test,"this is a modules case, show csvt in diff");

int test_os_funcions();
int modules_init()
{
	
	//CSVT.E("modules_init", "message!");
	test_os_funcions();
	//csvt_e("message %d ",1020);
}

int thread_fn(void*data)
{
    
    dpl_v("show name\n");
    while(1){
        
        dpl_thread_sleep(500);
        
        }
    
}
int test_os_funcions()
{
    
    dpl_thread_t *thread;
    dpl_init();
    //dpl_thread_init();
    dpl_status_t rt=dpl_thread_create( 0, 
				      "name1",
				      thread_fn, 
				      NULL,
				      0, 
				      0,
				      &thread);
				      
				      
	dpl_d("get thread name :%s",dpl_thread_get_name(thread));
	const char *file;
	int line ;
	dpl_uint32_t max_usage=dpl_thread_get_stack_max_usage(thread);;
	dpl_thread_get_stack_info( thread,
					      &file,
					      &line );
    
	dpl_d("get thread file:%s line:%d,%d",file,line,max_usage);
	dpl_thread_sleep(1500);
	dpl_thread_join(thread);
}

